package Lab02.test12;
public class Rectangular extends Shape{
    //属性：长、宽
    double length;
    double width;
    //行为：重写求面积及周长的功能
    @Override
    double area() {
        return area=length*width;
    }

    @Override
    double perimeter() {
            return perimeter=(length+width)*2;
        }
    }